<template>
	<view class="header">
		<image class="erweima" :show-menu-by-longpress="true"
			src="https://zjdemo.xuande.work:8889/photo/466c6d09dc5d401e8f30d2f9aec0037c.jpg" @click="previewImage">
		</image>
	</view>
</template>

<script>
	import {
		onShow,
		onLoad
	} from '@dcloudio/uni-app';
	export default {
		data() {
			return {

			}
		},
		methods: {
			previewImage(e) {
				uni.previewImage({
					// 需要预览的图片链接列表。若无需预览，可以注释urls
					urls: [e.target.src],
					// 为当前显示图片的链接/索引值
					current: e.target.src,
					// 图片指示器样式	
					indicator: 'default',
					// 是否可循环预览
					loop: false,
					// 长按图片显示操作菜单，如不填默认为保存相册
					// longPressActions:{
					// 	itemList:[this.l('发送给朋友'),this.l]
					// },
					success: res => {
						console.log('previewImage res', res);
					},
					fail: err => {
						console.log('previewImage err', err);
					}
				});
			},

		},
	}
</script>

<style>
	.header {
		height: 100vh;
		background-image: url('https://zjdemo.xuande.work:8889/photo/25c1ce16daf54ca1920e82ae6a74a1c3.png');
		background-size: 157% 103%;
		background-position: center;
		/* 使背景图像居中 */
	}
	.erweima {
	    position: fixed;
	    bottom: 123px;
	    width: 300px;
	    left: 35px;
	    right: 0;
	    height: 300px;
	}
</style>